<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        var reg0 = /^[A-Z0-9a-z]+$/;
        var reg1 = /^[A-Za-z]+[-@\.]+$/;
        var reg2 = /^[A-Z0-9]+[-@\.]+$/;
        var reg3 = /^[a-z0-9]+[-@\.]+$/;
        var mima = "234a@.";
        if (reg0.test(mima) || reg1.test(mima) || reg2.test(mima) || reg3.test(mima)) {
            console.log(true);

        } else {
            console.log(false);
        }
    </script>
</body>
</html>